using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class ShareCardRetInfo : GeneratedMessageLite<ShareCardRetInfo, ShareCardRetInfo.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<ShareCardRetInfo, ShareCardRetInfo.Builder>
		{
			private bool resultIsReadOnly;
			private ShareCardRetInfo result;
			protected override ShareCardRetInfo.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override ShareCardRetInfo MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override ShareCardRetInfo DefaultInstanceForType
			{
				get
				{
					return ShareCardRetInfo.DefaultInstance;
				}
			}
			public string UserName
			{
				get
				{
					return this.result.UserName;
				}
				set
				{
					this.SetUserName(value);
				}
			}
			public int RetCode
			{
				get
				{
					return this.result.RetCode;
				}
				set
				{
					this.SetRetCode(value);
				}
			}
			public Builder()
			{
				this.result = ShareCardRetInfo.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(ShareCardRetInfo cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private ShareCardRetInfo PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					ShareCardRetInfo other = this.result;
					this.result = new ShareCardRetInfo();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override ShareCardRetInfo.Builder Clear()
			{
				this.result = ShareCardRetInfo.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override ShareCardRetInfo.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new ShareCardRetInfo.Builder(this.result);
				}
				return new ShareCardRetInfo.Builder().MergeFrom(this.result);
			}
			public override ShareCardRetInfo BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override ShareCardRetInfo.Builder MergeFrom(IMessageLite other)
			{
				if (other is ShareCardRetInfo)
				{
					return this.MergeFrom((ShareCardRetInfo)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override ShareCardRetInfo.Builder MergeFrom(ShareCardRetInfo other)
			{
				return this;
			}
			public override ShareCardRetInfo.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override ShareCardRetInfo.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(ShareCardRetInfo._shareCardRetInfoFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = ShareCardRetInfo._shareCardRetInfoFieldTags[num2];
					}
					uint num3 = num;
					if (num3 == 0u)
					{
						throw InvalidProtocolBufferException.InvalidTag();
					}
					if (num3 != 10u)
					{
						if (num3 != 16u)
						{
							if (WireFormat.IsEndGroupTag(num))
							{
								return this;
							}
							this.ParseUnknownField(input, extensionRegistry, num, text);
						}
						else
						{
							this.result.hasRetCode = input.ReadInt32(ref this.result.retCode_);
						}
					}
					else
					{
						this.result.hasUserName = input.ReadString(ref this.result.userName_);
					}
				}
				return this;
			}
			public ShareCardRetInfo.Builder SetUserName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = value;
				return this;
			}
			public ShareCardRetInfo.Builder ClearUserName()
			{
				this.PrepareBuilder();
				this.result.hasUserName = false;
				this.result.userName_ = "";
				return this;
			}
			public ShareCardRetInfo.Builder SetRetCode(int value)
			{
				this.PrepareBuilder();
				this.result.hasRetCode = true;
				this.result.retCode_ = value;
				return this;
			}
			public ShareCardRetInfo.Builder ClearRetCode()
			{
				this.PrepareBuilder();
				this.result.hasRetCode = false;
				this.result.retCode_ = 0;
				return this;
			}
		}
		public const int UserNameFieldNumber = 1;
		public const int RetCodeFieldNumber = 2;
		private static readonly ShareCardRetInfo defaultInstance;
		private static readonly string[] _shareCardRetInfoFieldNames;
		private static readonly uint[] _shareCardRetInfoFieldTags;
		private bool hasUserName;
		private string userName_ = "";
		private bool hasRetCode;
		private int retCode_;
		private int memoizedSerializedSize = -1;
		public static ShareCardRetInfo DefaultInstance
		{
			get
			{
				return ShareCardRetInfo.defaultInstance;
			}
		}
		public override ShareCardRetInfo DefaultInstanceForType
		{
			get
			{
				return ShareCardRetInfo.DefaultInstance;
			}
		}
		protected override ShareCardRetInfo ThisMessage
		{
			get
			{
				return this;
			}
		}
		public string UserName
		{
			get
			{
				return this.userName_;
			}
		}
		public int RetCode
		{
			get
			{
				return this.retCode_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasRetCode;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasUserName)
				{
					num += CodedOutputStream.ComputeStringSize(1, this.UserName);
				}
				if (this.hasRetCode)
				{
					num += CodedOutputStream.ComputeInt32Size(2, this.RetCode);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private ShareCardRetInfo()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] shareCardRetInfoFieldNames = ShareCardRetInfo._shareCardRetInfoFieldNames;
			if (this.hasUserName)
			{
				output.WriteString(1, shareCardRetInfoFieldNames[1], this.UserName);
			}
			if (this.hasRetCode)
			{
				output.WriteInt32(2, shareCardRetInfoFieldNames[0], this.RetCode);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasUserName)
			{
				num ^= this.userName_.GetHashCode();
			}
			if (this.hasRetCode)
			{
				num ^= this.retCode_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			ShareCardRetInfo shareCardRetInfo = value as ShareCardRetInfo;
			return shareCardRetInfo != null && (this.hasUserName == shareCardRetInfo.hasUserName && (!this.hasUserName || this.userName_.Equals(shareCardRetInfo.userName_))) && (this.hasRetCode == shareCardRetInfo.hasRetCode && (!this.hasRetCode || this.retCode_.Equals(shareCardRetInfo.retCode_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<ShareCardRetInfo, ShareCardRetInfo.Builder>.PrintField("UserName", this.hasUserName, this.userName_, writer);
			GeneratedMessageLite<ShareCardRetInfo, ShareCardRetInfo.Builder>.PrintField("RetCode", this.hasRetCode, this.retCode_, writer);
		}
		public static ShareCardRetInfo ParseFrom(byte[] data)
		{
			return ShareCardRetInfo.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private ShareCardRetInfo MakeReadOnly()
		{
			return this;
		}
		public static ShareCardRetInfo.Builder CreateBuilder()
		{
			return new ShareCardRetInfo.Builder();
		}
		public override ShareCardRetInfo.Builder ToBuilder()
		{
			return ShareCardRetInfo.CreateBuilder(this);
		}
		public override ShareCardRetInfo.Builder CreateBuilderForType()
		{
			return new ShareCardRetInfo.Builder();
		}
		public static ShareCardRetInfo.Builder CreateBuilder(ShareCardRetInfo prototype)
		{
			return new ShareCardRetInfo.Builder(prototype);
		}
		static ShareCardRetInfo()
		{
			ShareCardRetInfo.defaultInstance = new ShareCardRetInfo().MakeReadOnly();
			ShareCardRetInfo._shareCardRetInfoFieldNames = new string[]
			{
				"RetCode",
				"UserName"
			};
			ShareCardRetInfo._shareCardRetInfoFieldTags = new uint[]
			{
				16u,
				10u
			};
			object.ReferenceEquals(micromsg.Proto.ShareCardRetInfo.Descriptor, null);
		}
	}
}
